<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        /* body{
            margin: 0 auto;
            border: 1px solid black;
            width: 500px;
            height: 500px;
        } */
        .box{
            width: 100px;
            height: 100px;
            background-color:rgb(0,128,128);
            transition: linear;
            animation: dong 5s  linear infinite;

        }
        @keyframes dong {
            0% {transform: translateX(0px);}
            25%{transform: translateX(500px);}
            50%{transform: translate(500px,500px);}
            75%{transform: translate(0px,500px);}
            100%{transform: translate(0px);}
        }
    </style>
</head>
<body>
    <div class="box"></div>
</body>
</html>